<template>
	<view style="position: relative;">
		<image class="img" src="./1007icon3.png" mode="widthFix"></image>
		<view class="backBtn" @tap="backBtn"></view>
		<view class="backBtn1" @tap="backBtn1"></view>
		<view class="list">{{'('+list.balance.bankCode.replace(/^(\w{0})\w{15}(.*)$/, '$1**$2')+')'}}</view>
		<view class="list1" style="font-family: 'jtfont-icon';">{{list.balance.showBalance}}</view>
		<view class="list2" style="font-family: 'jtfont-icon';">{{'￥ '+list.balance.showBalance}}</view>
	</view>
</template>

<script>
	const http = require('../../../utils/http.js');
	export default {
		data() {
			return {
				list:null,
				kaNum:null
			}
		},
		onLoad(options) {
			this.id=options.id
		},
		onShow() {
			uni.showLoading({
			    title: '加载中'
			});
			http.get('/api/balance/getBalanceDetail',{balanceId:this.id}).then(res => {
				//console.log(res.result.balance.bankCode)
				//console.log(res.result.balance.bankCode.replace(/^(\w{4})\w{10}(.*)$/, '$1***$2'))
				if (res.code == 200 && res.result) {
					this.list=res.result
					this.kaNum=res.result.balance.bankCode.replace(/^(\w{4})\w{11}(.*)$/, '$1 ****** $2')
				}
				uni.hideLoading();
			})
		},
		methods: {
			backBtn:function(){
				uni.navigateBack({
					delta: 1
				})
			},
			backBtn1:function(){
				uni.navigateTo({
				    url: '../1007?id='+this.id
				});
			}
		}
	}
</script>

<style>
	@font-face {
		font-family:jtfont-icon;
		src: url('~@/fonts/jtfont.ttf');
	}
	.backBtn{
		width: 10vw;
		height: 10vw;
		position: absolute;
		top: 9vw;
		left: 4vw;
	}
	.backBtn1{
		width: 20vw;
		height: 8vw;
		position: absolute;
		top: 108vw;
		left: 8vw;
	}
	.img{
		width: 100%;
	}
	.list{
		font-size: 4.5vw;
		color: #38414a;
		position: absolute;
		top: 81vw;
		left: 50vw;
	}
	.list1{
		position: absolute;
		top: 54.8vw;
		left: 4vw;
		font-size: 9.2vw;
		color: #FFFFFF;
	}
	.list2{
		font-size: 4.8vw;
		color: #37414d;
		position: absolute;
		top: 95.2vw;
		right: 14vw;
	}
</style>
